package com.yc.bean;

import java.io.Serializable;

/**
 * @author zwei
 * @create 2024-05-15 20:14
 */


public class CartItem implements Serializable {
    private Books book;
    private int num;
    private double smallCount;

    public void setBook(Books book) {
        this.book = book;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public void setSmallCount(double smallCount) {
        this.smallCount = smallCount;
    }

    public Books getBook() {
        return book;
    }

    public int getNum() {
        return num;
    }

    public double getSmallCount() {
        if (book!=null){
            smallCount=this.book.getPrice()*this.num;
        }
        return smallCount;
    }
}
